+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
+Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
+ the local fails, like gdk_set_locale() did.
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
+ Don't free local_list if local_count == 0. (#71241, reported
+ by Kevin Vandersloot.)
+
+ * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
+ Clean up list == NULL handling and failure.
+
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (typesystem_recurse): Cast GType
XTextProperty property;
gint count = 0;
gint res;
-
- if (!list)
- return 0;
+ gchar **local_list;
property.value = (guchar *)text;
property.encoding = gdk_x11_atom_to_xatom (encoding);
property.format = format;
property.nitems = length;
- res = XmbTextPropertyToTextList (GDK_DISPLAY(), &property, list, &count);
+ res = XmbTextPropertyToTextList (GDK_DISPLAY(), &property, &local_list, &count);
- if (res == XNoMemory || res == XLocaleNotSupported ||
- res == XConverterNotFound)
- return 0;
+ if (res == XNoMemory || res == XLocaleNotSupported || res == XConverterNotFound)
+ {
+ if (list)
+ *list = NULL;
+
+ return 0;
+ }
else
- return count;
+ {
+ if (list)
+ *list = local_list;
+ else
+ XFreeStringList (local_list);
+
+ return count;
+ }
}
void
(*list)[count++] = g_strdup (local_list[i]);
}
}
+
+ if (local_count)
+ gdk_free_text_list (local_list);
- gdk_free_text_list (local_list);
(*list)[count] = NULL;
return count;
#endif
if (do_setlocale)
- setlocale (LC_ALL, "");
+ {
+ if (!setlocale (LC_ALL, ""))
+ g_warning ("Locale not supported by C library.\n\tUsing the fallback 'C' locale.");
+ }
/* Initialize "gdk". We pass along the 'argc' and 'argv'
* parameters as they contain information that GDK uses